package org.example.controller;

import org.example.service.TestService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.Serializable;

/**
 * TestController：
 * Description:
 *
 * @author: Lonni
 * @date: 2024/7/11 0011 15:27
 */
@RestController
@Slf4j
public class TestController implements Serializable {





    @Autowired
    private TestService testService;

//    @GetMapping("t1")
//    public String test1() {
//        String res = properties.getIp() + ":" + properties.getPort();
//        log.info("配置文件获取修改前:{}", res);
//
//        properties.setIp("localhost");
//        properties.setPort(123456);
//        String res1 = properties.getIp() + ":" + properties.getPort();
//        log.info("修改后:{}", res1);
//
//        String s = testService.get();
//        log.info("修改后从配置文件读取:{}",s);
//
//        return  res+"\n"+res1+"\n"+s;
//    }


    @GetMapping("c1")
    public String c1(){
        return testService.getRpc();

    }
}



